#!/bin/bash

ls "/home/anucsiro/projects/GA/ForTransformFromGA" | while read f; do
    fileNamePath="/home/anucsiro/projects/GA/ForTransformFromGA/""$f"
    fileNameNoExtension=${f%.*}
    echo File: $fileNamePath
    echo Transforming $fileNamePath
    echo java -jar /home/anucsiro/workspace/XML/XSLT/saxon9he.jar "/home/anucsiro/projects/GA/ForTransformFromGA/""$f" /home/anucsiro/workspace/XML/XSLT/ISO19139_To_RIFCS/GA/GA_rif_refactored.xsl
    java -jar /home/anucsiro/workspace/XML/XSLT/saxon9he.jar \
        "/home/anucsiro/projects/GA/ForTransformFromGA/""$f" \
        /home/anucsiro/workspace/XML/XSLT/ISO19139_To_RIFCS/GA/GA_rif_refactored.xsl \
        > /home/anucsiro/workspace/XML/ShellScripts/ForGA/$fileNameNoExtension"_rif-cs.xml" 
    echo XML written to /home/anucsiro/workspace/XML/ShellScripts/ForGA/$fileNameNoExtension"_rif-cs.xml"

done












